package com.yangxk.kadmin.web.common.datascope;

/**
 * 利用ThreadLocal将当前请求的数据权限进行封装
 *
 * @author yangxk
 * @date 2019/2/1 17:39
 */
public class DataScopeHolder {

    private static final ThreadLocal<DataScopeParam> tl = new ThreadLocal<>();

    public static void set(DataScopeParam dsp) {
        tl.set(dsp);
    }

    public static DataScopeParam get() {
        return tl.get();
    }

    public static void remove() {
        tl.remove();
    }
}
